<?php

namespace app\api\controller;

use app\common\controller\Api;
use fast\Http;

/**
 * 首页接口
 */
class Index extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function index()
    {
        $this->success('请求成功');
    }

    public function test()
    {
        $params = [
            'ordersn' => '1234567890',
            'price' => 0.5,
            'paytype' => 'wechat',
            'callbackurl' => 'http://www.baidu.com',
            'payplatform' => 'joinpay',
            'nonce_str'  => 'asdasdasdasdasdas',
            'title' => '号商铺',
            'platform'  => 'hechuangyoupin',
            'appid'     =>'wxf485244db460b0d0'
        ];

        $response = Http::post('https://pay.hcss6.com/api/Pays/index', $params);
       var_dump($response);
    }

    public function test2()
    {


//        echo 'success';exit;

        echo 'fail';exit;
    }
}
